fix(mail): warn before opening mismatched displayed links#1833
fix(mail): warn before opening mismatched displayed links#1833KaannKara wants to merge 3 commits into
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 76fdf03efd
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| confirmDialog.afterClosed().subscribe(result => { | ||
| if (result) { | ||
| const openedWindow = window.open(linkMismatch.href, '_blank', 'noopener'); | ||
| if (openedWindow) { |
There was a problem hiding this comment.
Open confirmed links in a direct user-gesture handler
In warnBeforeOpeningMismatchedLink, the call to window.open happens inside afterClosed().subscribe(...), which runs after the dialog close flow rather than inside the original link click handler. In browsers with stricter popup-blocking heuristics (commonly Safari/Firefox and hardened Chrome settings), that loses transient user activation, so users can click “open link” and still get no tab/window because window.open is blocked and returns null. This introduces a real regression for mismatched links: they may become impossible to open even after explicit confirmation.
Useful? React with 👍 / 👎.
Fixes #1688.
Summary
Tests
AI use disclosure